﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.ServiceModel.Web;
using System.Text;
using ActivitiesControl.Domain.Model.Entities;

namespace ActivitiesControl.Services.WCF
{
    [ServiceContract]
	public interface IActivitiesControlServices
    {
		#region Activity Services
		[OperationContract]
		IEnumerable<Customer> GetCustomersForForm(int resourceId);
		[OperationContract]
		IEnumerable<Project> GetProjectsForForm(int customerId);
		[OperationContract]
		IEnumerable<Resource> GetResourcesForForm(int resourceId);
		[OperationContract]
		IEnumerable<string> GetActivityTypesForForm(int customerId);
		[OperationContract]
		IEnumerable<Customer> GetCustomersForSearchFilter(int resourceId);
		[OperationContract]
		IEnumerable<Project> GetProjectsForSearchFilter(int customerId);
		[OperationContract]
		void SaveActivity(
			int? activityId,
			string description,
			string activityType,
			int effortHours,
			DateTime date,
			int projectId,
			int resourceId);
		[OperationContract]
		void ExcludeActivity(
			int activityId);
		[OperationContract]
		IEnumerable<Activity> GetActivities(
			int resourceId,
			DateTime begin,
			DateTime end,
			int customerId,
			int projectId);
		[OperationContract]
		Activity GetActivityById(int id); 
		#endregion

		#region User Services
		[OperationContract]
		bool ValidateUser(string login, string password, out User loggedUser);
		[OperationContract]
		void UpdateUserPassword(string login, string password, string newPassword, string newPasswordConfirmation);
		[OperationContract]
		User GetUserByLogin(string login);
		#endregion
    }
}
